package br.com.klis.easycontrast.android.model;

import java.io.Serializable;

import android.graphics.Color;
import br.com.klis.easycontrast.R;
import br.com.klis.easycontrast.model.Constants;
import br.com.klis.easycontrast.model.ContrastMode;

public class ColdContrastMode implements ContrastMode, Serializable {
	private static final long serialVersionUID = 9125504199066880584L;
	
	private int id = Constants.STARTS_WITH_COLD;
	private int textColor = Color.parseColor("#3BB9FF");
	private int text = R.string.cold_time_title;
	private int time = 0;
	private int timeSec = 0;
	
	
	public ColdContrastMode(int time, int sec){
		this.time = time;
		this.timeSec = sec;
	}

	@Override
	public int getId() {
		return id;
	}
	
	@Override
	public int getTextColor() {
		return textColor;
	}

	@Override
	public int getText() {
		return text;
	}

	@Override
	public int getTime() {
		return time;
	}

	@Override
	public int getTimeSec() {
		return timeSec;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		result = prime * result + text;
		result = prime * result + textColor;
		result = prime * result + time;
		result = prime * result + timeSec;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ColdContrastMode other = (ColdContrastMode) obj;
		if (id != other.id)
			return false;
		if (text != other.text)
			return false;
		if (textColor != other.textColor)
			return false;
		if (time != other.time)
			return false;
		if (timeSec != other.timeSec)
			return false;
		return true;
	}
	
}
